﻿<%@ Page Language="C#" MasterPageFile="~/MasterPages/JAFagus.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Indeco.G24.Website.Price.Default" Title="Bảng giá sản phẩm" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolderMain" runat="server">
    <div style="padding-left:5px; width:100%; text-align:left">
        <asp:SiteMapPath ID="G24SiteMap1" runat="server" Font-Size="8pt">
        </asp:SiteMapPath>
    </div>
    <table border="0" cellpadding="5" cellspacing="0" style="width: 100%; height: 100%">
        <tr>
            <td align="left" style="width: 80%" valign="top">
                <dxrp:ASPxRoundPanel ID="panelBangGiaTinhThanh" runat="server" BackColor="#EBF2F4"
                    CssFilePath="~/App_Themes/Glass/{0}/styles.css" CssPostfix="Glass" HeaderText="Bảng giá" Width="100%">
                    <PanelCollection>
                        <dxp:PanelContent runat="server">
                            <dxcp:ASPxCallbackPanel runat="server" Width="100%" ID="callbackPanelDiaBan" ClientInstanceName="CallbackPanelDiaBan" OnCallback="callbackPanelDiaBan_Callback" CssFilePath="~/App_Themes/Glass/{0}/styles.css" CssPostfix="Glass" ImageFolder="~/App_Themes/Glass/{0}/">
                                <PanelCollection>
                                    <dxrp:PanelContent runat="server" >
<%--                                        <div style="overflow-y: scroll; height: 500px">  
SettingsPager-PageSize="" 
--%>                                          

    <dxwgv:ASPxGridView ID="BangGiaSanPham" SettingsPager-PageSize="200" ClientInstanceName="grid"
        runat="server" KeyFieldName="KeyBangGia" Width="100%" AutoGenerateColumns="False"
        CssFilePath="~/App_Themes/Glass/{0}/styles.css" CssPostfix="Glass" >
        <SettingsEditing Mode="Inline" />
        <SettingsText EmptyDataRow="Kh&#244;ng c&#243; dữ liệu" />
        <Styles CssFilePath="~/App_Themes/Glass/{0}/styles.css" CssPostfix="Glass">
            <Header ImageSpacing="5px" SortingImageSpacing="5px">
            </Header>
            <GroupPanel HorizontalAlign="Left">
            </GroupPanel>
            <GroupRow HorizontalAlign="Left" Font-Bold="true">
            </GroupRow>
        </Styles>
        <Settings ShowFilterRow="True" ShowGroupPanel="True" />
        <Images ImageFolder="~/App_Themes/Glass/{0}/">
            <PopupEditFormWindowClose Height="17px" Width="17px" />
            <CollapsedButton Height="12px" Width="11px" />
            <DetailCollapsedButton Height="9px" Width="9px" />
        </Images>
        <%-- <TotalSummary>
            <dxwgv:ASPxSummaryItem FieldName="IDSanPham" SummaryType="Count" />
            <dxwgv:ASPxSummaryItem FieldName="DonGia" SummaryType="Sum" DisplayFormat="c" />
        </TotalSummary>--%>
        <%-- <Templates>
          <EditForm>
          <div style="padding:4px 4px 3px 4px">
 
                     <uc1:frmNhapBangGia ID="FrmNhapBangGia1" runat="server" ID_DiaBan='<%# Eval("IDDiaBan") %>' ID_NhaCungCap='<%# Eval("IDNhaCungCap") %>' ID_SanPham='<%# Eval("IDSanPham") %>' KeyBangGia='<%# Eval("KeyBangGia") %>'/>
                         <dxwgv:ASPxGridViewTemplateReplacement ID="Editors" ReplacementType="EditFormCancelButton" runat="server"></dxwgv:ASPxGridViewTemplateReplacement>
                     
             </div>
             <div style="text-align:right; padding:2px 2px 2px 2px">
                 <dxwgv:ASPxGridViewTemplateReplacement ID="UpdateButton" ReplacementType="EditFormUpdateButton" runat="server"></dxwgv:ASPxGridViewTemplateReplacement>
                 <dxwgv:ASPxGridViewTemplateReplacement ID="CancelButton" ReplacementType="EditFormCancelButton" runat="server"></dxwgv:ASPxGridViewTemplateReplacement>
             </div>

          </EditForm>
      </Templates>--%>
        <Columns>
            <dxwgv:GridViewDataTextColumn FieldName="IDNhaCungCapSource.Ten" HeaderStyle-Font-Bold="true"
                CellStyle-HorizontalAlign="Left" Caption="Nhà cung cấp" VisibleIndex="0">
                <DataItemTemplate>
                    <asp:Label ID="lblTenNhaCungCap" runat="server" Text='<%# Eval("IDNhaCungCapSource.Ten") %>'></asp:Label>
                </DataItemTemplate>
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataTextColumn FieldName="IDSanPhamSource.IDSanPhamDanhMucSource.Ten"
                HeaderStyle-Font-Bold="true" CellStyle-HorizontalAlign="Left" Caption="Danh mục"
                VisibleIndex="1">
                <DataItemTemplate>
                    <asp:Label ID="lblTenSanPham" runat="server" Text='<%# Eval("IDSanPhamSource.IDSanPhamDanhMucSource.Ten") %>'></asp:Label>
                </DataItemTemplate>
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataTextColumn FieldName="IDSanPhamSource.Ten" HeaderStyle-Font-Bold="true"
                CellStyle-HorizontalAlign="Left" Caption="Tên sản phẩm" VisibleIndex="2">
                <DataItemTemplate>
                    <asp:Label ID="lblTenSanPham" runat="server" Text='<%# Eval("IDSanPhamSource.Ten") %>'></asp:Label>
                </DataItemTemplate>
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataTextColumn FieldName="IDSanPhamSource.DonViTinh" HeaderStyle-Font-Bold="true"
                CellStyle-HorizontalAlign="Left" Caption="Đơn vị tính" VisibleIndex="3">
                <DataItemTemplate>
                    <asp:Label ID="lblDonViTinh" runat="server" Text='<%# Eval("IDSanPhamSource.DonViTinh") %>'></asp:Label>
                </DataItemTemplate>
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataTextColumn FieldName="TieuChuanKyThuat" Caption="TCKT" HeaderStyle-Font-Bold="true"
                VisibleIndex="4">
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataTextColumn FieldName="DonGia" Caption="Đơn giá" HeaderStyle-Font-Bold="true"
                VisibleIndex="5">
                <DataItemTemplate>
                    <asp:Label ID="lblDonGia" runat="server" Text='<%# String.Format("{0:N}", Eval("DonGia")) + " " + Eval("IDNgoaiTeSource.KyHieu") %>'></asp:Label>
                </DataItemTemplate>
            </dxwgv:GridViewDataTextColumn>
            <dxwgv:GridViewDataTextColumn FieldName="VAT" Caption="VAT" CellStyle-Wrap="False"
                HeaderStyle-Font-Bold="true" VisibleIndex="6">
                <DataItemTemplate>
                    <asp:Label ID="lblVAT" runat="server" Text='<%# Eval("VAT") + " %" %>'></asp:Label>
                </DataItemTemplate>
            </dxwgv:GridViewDataTextColumn>           
        </Columns>
    </dxwgv:ASPxGridView>

<%--                                        </div>
--%>                                    </dxrp:PanelContent>
                                </PanelCollection>
                            </dxcp:ASPxCallbackPanel>
                        </dxp:PanelContent>
                    </PanelCollection>
                    <BottomLeftCorner Height="5px" Url="~/App_Themes/Glass/Web/rpBottomLeftCorner.png"
                        Width="5px" />
                    <TopRightCorner Height="5px" Url="~/App_Themes/Glass/Web/rpTopRightCorner.png" Width="5px" />
                    <BottomRightCorner Height="5px" Url="~/App_Themes/Glass/Web/rpBottomRightCorner.png"
                        Width="5px" />
                    <Content>
                        <BackgroundImage ImageUrl="~/App_Themes/Glass/Web/rpContentBack.gif"
                            VerticalPosition="bottom" Repeat="RepeatX" />
                    </Content>
                    <NoHeaderTopEdge BackColor="#EBF2F4">
                    </NoHeaderTopEdge>
                    <HeaderLeftEdge>
                        <BackgroundImage ImageUrl="~/App_Themes/Glass/Web/rpHeaderLeftEdge.gif" Repeat="RepeatX"
                            VerticalPosition="bottom" />
                    </HeaderLeftEdge>
                    <NoHeaderTopRightCorner Height="5px" Url="~/App_Themes/Glass/Web/rpNoHeaderTopRightCorner.png"
                        Width="5px" />
                    <RightEdge>
                        <BackgroundImage ImageUrl="~/App_Themes/Glass/Web/rpLeftRightEdge.gif" Repeat="RepeatX"
                            VerticalPosition="bottom" />
                    </RightEdge>
                    <HeaderContent>
                        <BackgroundImage ImageUrl="~/App_Themes/Glass/Web/rpHeaderBack.gif" Repeat="RepeatX"
                            VerticalPosition="bottom" />
                    </HeaderContent>
                    <BottomEdge BackColor="#D7E9F1">
                    </BottomEdge>
                    <TopLeftCorner Height="5px" Url="~/App_Themes/Glass/Web/rpTopLeftCorner.png" Width="5px" />
                    <LeftEdge>
                        <BackgroundImage ImageUrl="~/App_Themes/Glass/Web/rpLeftRightEdge.gif" Repeat="RepeatX"
                            VerticalPosition="bottom" />
                    </LeftEdge>
                    <ContentPaddings PaddingLeft="4px" PaddingTop="10px" PaddingBottom="10px" />
                    <NoHeaderTopLeftCorner Height="5px" Url="~/App_Themes/Glass/Web/rpNoHeaderTopLeftCorner.png"
                        Width="5px" />
                    <HeaderRightEdge>
                        <BackgroundImage ImageUrl="~/App_Themes/Glass/Web/rpHeaderRightEdge.gif" VerticalPosition="bottom" />
                    </HeaderRightEdge>
                    <Border BorderStyle="Solid" BorderColor="#7EACB1" BorderWidth="1px" />
                    <HeaderStyle BackColor="White" Height="23px">
                        <Paddings PaddingBottom="0px" PaddingLeft="2px" PaddingTop="0px" />
                        <BorderBottom BorderStyle="None" />
                    </HeaderStyle>
                </dxrp:ASPxRoundPanel>
            </td>
            <td align="right" valign="top">
                <dxrp:ASPxRoundPanel ID="panelTinhThanh" runat="server" BackColor="#EBF2F4" CssFilePath="~/App_Themes/Glass/{0}/styles.css"
                    CssPostfix="Glass" HeaderText="Tỉnh thành" HorizontalAlign="Left" Width="100%">
                    <PanelCollection>
                        <dxp:PanelContent runat="server">
                            <dxe:ASPxListBox ID="listDiaBan" runat="server" Height="500" Width="100%" ClientInstanceName="ListBoxDiaBan" DataSourceID="diaBanDataSource" TextField="Ten" ValueField="IDDiaBan">
                                <ClientSideEvents SelectedIndexChanged="function(s, e) {
                                    var item = ListBoxDiaBan.GetSelectedItem();
                                    CallbackPanelDiaBan.PerformCallback(item.value);
                                }" />                            
                            </dxe:ASPxListBox>                            
                        <data:DiaBanDataSource ID="diaBanDataSource" runat="server" CacheDuration="30" EnableCaching="true" EnablePaging="False" EnableTransaction="True"  SelectMethod="GetPaged">
                        <Parameters>
                            <data:SqlParameter Name="OrderBy" DefaultValue="Ten" />    
                        </Parameters>
                        </data:DiaBanDataSource>
                        </dxp:PanelContent>
                    </PanelCollection>
                    <BottomLeftCorner Height="5px" Url="~/App_Themes/Glass/Web/rpBottomLeftCorner.png"
                        Width="5px" />
                    <TopRightCorner Height="5px" Url="~/App_Themes/Glass/Web/rpTopRightCorner.png" Width="5px" />
                    <BottomRightCorner Height="5px" Url="~/App_Themes/Glass/Web/rpBottomRightCorner.png"
                        Width="5px" />
                    <Content>
                        <BackgroundImage ImageUrl="~/App_Themes/Glass/Web/rpContentBack.gif" Repeat="RepeatX"
                            VerticalPosition="bottom" />
                    </Content>
                    <NoHeaderTopEdge BackColor="#EBF2F4">
                    </NoHeaderTopEdge>
                    <HeaderLeftEdge>
                        <BackgroundImage ImageUrl="~/App_Themes/Glass/Web/rpHeaderLeftEdge.gif" Repeat="RepeatX"
                            VerticalPosition="bottom" />
                    </HeaderLeftEdge>
                    <NoHeaderTopRightCorner Height="5px" Url="~/App_Themes/Glass/Web/rpNoHeaderTopRightCorner.png"
                        Width="5px" />
                    <RightEdge>
                        <BackgroundImage ImageUrl="~/App_Themes/Glass/Web/rpLeftRightEdge.gif" Repeat="RepeatX"
                            VerticalPosition="bottom" />
                    </RightEdge>
                    <HeaderContent>
                        <BackgroundImage ImageUrl="~/App_Themes/Glass/Web/rpHeaderBack.gif" Repeat="RepeatX"
                            VerticalPosition="bottom" />
                    </HeaderContent>
                    <BottomEdge BackColor="#D7E9F1">
                    </BottomEdge>
                    <TopLeftCorner Height="5px" Url="~/App_Themes/Glass/Web/rpTopLeftCorner.png" Width="5px" />
                    <LeftEdge>
                        <BackgroundImage ImageUrl="~/App_Themes/Glass/Web/rpLeftRightEdge.gif" Repeat="RepeatX"
                            VerticalPosition="bottom" />
                    </LeftEdge>
                    <ContentPaddings PaddingBottom="10px" PaddingLeft="4px" PaddingTop="10px" />
                    <NoHeaderTopLeftCorner Height="5px" Url="~/App_Themes/Glass/Web/rpNoHeaderTopLeftCorner.png"
                        Width="5px" />
                    <HeaderRightEdge>
                        <BackgroundImage ImageUrl="~/App_Themes/Glass/Web/rpHeaderRightEdge.gif" VerticalPosition="bottom" />
                    </HeaderRightEdge>
                    <Border BorderColor="#7EACB1" BorderStyle="Solid" BorderWidth="1px" />
                    <HeaderStyle BackColor="White" Height="23px">
                        <Paddings PaddingBottom="0px" PaddingLeft="2px" PaddingTop="0px" />
                        <BorderBottom BorderStyle="None" />
                    </HeaderStyle>
                </dxrp:ASPxRoundPanel>
            </td>
        </tr>
    </table>
</asp:Content>
